#include "Viewport.h"
namespace sl
{

	Viewport::Viewport(void)
		:m_x(0)
		,m_y(0)
		,m_width(1024)
		,m_height(768)
	{
	}


	Viewport::Viewport(value_type x, value_type y, value_type width, value_type height )
		:m_x(x)
		,m_y(y)
		,m_width(width)
		,m_height(height)
	{

	}

	Viewport::~Viewport(void)
	{
	}


	void Viewport::set( value_type x, value_type y, value_type width, value_type height )
	{
		m_x			= x; 
		m_y			= y;
		m_width		= width;
		m_height	= height;
	}

	void Viewport::apply( State * states )
	{
		// if this is the opengles, how to do this
		glViewport( m_x, m_y, m_width, m_height );
	}

}
